package hhm.framessm.portal.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import hhm.framessm.pojo.TbUser;

@Controller
@RequestMapping("/order")
public class OrderController {

	@RequestMapping("/create")
	public String createOrder(Order order, Model model, HttpServletRequest request) {
		try {
			// 从Request中取用户信息
			TbUser user = (TbUser) request.getAttribute("user");

			return "success";

		} catch (Exception e) {
			e.printStackTrace();
			model.addAttribute("message", "创建订单出错。请稍后重试！");
			return "error/exception";
		}
	}

}
